package cn.lizemin.fakedata.security.controller;

import cn.lizemin.fakedata.common.RespBean;
import cn.lizemin.fakedata.security.annotation.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lzm
 * @Date 2024/7/7
 * @description
 */
@RestController
public class HelloController {

    @GetMapping("/heart")
    public RespBean heart() {
        return RespBean.success("ok");
    }

    @GetMapping("/createOrder")
    @PreAuthorize("order:create")
    public RespBean createOrder() {
        return RespBean.success().message("订单创建成功");
    }

    @GetMapping("/queryOrder")
    @PreAuthorize("order:query")
    public RespBean queryOrder() {
        return RespBean.success().message("订单查询成功");
    }


}
